#ifndef TRANSGENETIC_ALGORITHM_H
#define TRANSGENETIC_ALGORITHM_H

#include "algorithm.h"
#include "cromossom.h"

#include<vector>

class TransgeneticAlgorithm : public Algorithm{
	public:
		TransgeneticAlgorithm(const char*);
		~TransgeneticAlgorithm();
		
		Cromossom** initPopulation();
		void checkBest();
		
		int* randomInit();
		int assessFitness(int*);
		static int compareIndividuals(const void*, const void*);
		
		
		
		void copySolution(int*, int*);
		int getQualityOfBest();
		void deletePopulation(Cromossom**);
		void solve();
				
	private:
		
		void applyPlasmideo();
		void applyTranspossom();
		void generatePlasmideos();
		Set* choosePlasmideo();
		
		int n; //number of individuals
		Cromossom** population;
		int quality_best;
		double alpha;
		
		int max_plasmideos;
		vector<Set*> plasmideos;
};

#include "transgenetic_algorithm.cpp"

#endif